<?php
/**
 * 
 * @author Todd
 *
 */
class Control_ClientLog_select  {
	function select() {
		$action = MooForm::request('action');
		$getGame = $game = MooForm::request('game');
		
		$game = MooObj::get('Game')->transportGame($getGame);
		
		!$getGame && $getGame = "全民霸业";
		MooView::set('nowGame', $getGame);
		
		if($action == 1) {
			$logType = MooForm::request('logType');
			$logKey = MooForm::request('logKey');
			$fetch_client_logUrl = MooConfig::get('main.fetch_client_log');
			!$fetch_client_logUrl && $fetch_client_logUrl = "http://123.59.64.163:9001/fetch_client_log";
			$url = $fetch_client_logUrl . "?game={$game}&logType={$logType}&logKey={$logKey}";
			
			$data = MooUtil::curl_send($url,null,30);
			
			// \n 换成br
			$data = str_replace("\n", "<br/>", $data);
			
			MooView::set('data', $data);
		} 
		
		MooView::render('ClientLog');
	}
}